import Vue from "vue";
import App from "./App.vue";
import "bootstrap/dist/css/bootstrap.css";
import "./assets/fonts/iconfont.css";

Vue.config.productionTip = false;
import axios from "axios";
Vue.prototype.$axios = axios;
axios.defaults.baseURL = "https://www.escook.cn";
// 引入
import VueRouter from "vue-router";
import MyGoodList from "@/views/MyGoodsList";
import MyGoodSearch from "@/views/MyGoodsSearch";
import MyUserInfo from "@/views/MyUserInfo";
// 使用路由插件
Vue.use(VueRouter);
// 创建规则
const routes = [
  {
    path: "/",
    redirect: "/mygoodlist",
  },
  {
    path: "/mygoodlist",
    component: MyGoodList,
  },
  {
    path: "/mygoodsearch",
    component: MyGoodSearch,
  },
  {
    path: "/myuserinfo",
    component: MyUserInfo,
  },
];
// 创建对象 - 传入规则
const router = new VueRouter({
  routes,
});
// 关联到实例对象
new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
